<%= header %>
<!--
Bug: t_domloaded is negative when XHR occurs between page's DOMContentLoaded and page's onLoad 
|************|*******************|++++++|******|
^navstart    ^DOMContentLoaded     ^XHR        ^onLoad
-->
<%= boomerangScript %>
<script src="101515-01.js" type="text/javascript"></script>
<img id="main-image" src="" />
<script type="text/javascript">

BOOMR_test.init({
	testAfterOnBeacon: 2,
	ResourceTiming: {
		enabled: true
	},
	instrument_xhr: true
});

// delay xhr to start after domcontentloaded event triggers
setTimeout(function() {
	var xhr = new XMLHttpRequest();
	xhr.open("GET", "/delay?delay=100&file=build/boomerang-latest-debug.js");
	xhr.send(null);
}, 500);

var img = document.getElementById("main-image");
// slow image to delay onload until xhr completes
img.src = "/delay?delay=1000&file=/assets/img.jpg&foo=" + Math.round(Math.random() * 100000);

</script>
<%= footer %>
